How to find out different instances for same columns?

How to find out different instances of same columns?

E.g Suppose I add absolute number column in my current module's current view also I add same column instance but with a different name(suppose absNo) values will same that I know,  then how to find it that both columns are of same attribute type i.e absolute number using DXL. I have to print both names(i.e  absolute number &absNo) in respected attributes for those columns using DXL.

Thanks in advance


Mayur Chaudhari - Fri Nov 17 02:08:54 EST 2017

Re: How to find out different instances for same columns?
PekkaMakinen - Fri Nov 17 02:33:47 EST 2017

If you read through the DXL Reference you can find this entry in there

 

attrName 
Declaration 
string attrName(Column c) 
Operation 
Returns the name of the attribute displayed in a column; this is the value that the attribute(in column) function sets. Returns null if the column does not display an attribute. 

Example 
This example prints out the names of all the attributes displayed in the current view: 

Module m = current 
Column c 
for c in m do {
    print "<" (attrName c) ">\n"
} 

 

 

Re: How to find out different instances for same columns?
Mayur Chaudhari - Fri Nov 17 04:11:29 EST 2017

PekkaMakinen - Fri Nov 17 02:33:47 EST 2017

If you read through the DXL Reference you can find this entry in there

 

attrName 
Declaration 
string attrName(Column c) 
Operation 
Returns the name of the attribute displayed in a column; this is the value that the attribute(in column) function sets. Returns null if the column does not display an attribute. 

Example 
This example prints out the names of all the attributes displayed in the current view: 

Module m = current 
Column c 
for c in m do {
    print "<" (attrName c) ">\n"
} 

 

 

I want to club (in the sense I will show For Name absolute no i will have two values e.g Attribute Name="Absolute Number"  Labels="Absolute Number, absNo") absolute number and absNo as I said earlier in one string how do I get it? 

since these contain same values but only the labels are different.How do i achieve it using DXL?

Re: How to find out different instances for same columns?
Mike.Scharnow - Fri Nov 17 04:40:16 EST 2017

Mayur Chaudhari - Fri Nov 17 04:11:29 EST 2017

I want to club (in the sense I will show For Name absolute no i will have two values e.g Attribute Name="Absolute Number"  Labels="Absolute Number, absNo") absolute number and absNo as I said earlier in one string how do I get it? 

since these contain same values but only the labels are different.How do i achieve it using DXL?

Mayur, Pekka has already given you the hint where to find the info about attrName in the DXL manual. Why don't you open the manual, search for the referenced entry and read the whole chapter about Columns (or while you're at it, the whole containing chapter about Views)? I am sure that in two minutes you have the information you need.

Re: How to find out different instances for same columns?
Bill_B. - Fri Nov 17 08:48:09 EST 2017

Mike and Pekka, thank you both for your many helpful posts over the years to this forum...what I think he is asking, but not being very clear or nice about it, is how to get the Column Title information out where the attribute was renamed when added to a view...the code above gives the attribute name, but not the column title if it was renamed...I think replacing 'attrName' with 'title' will accomplish this, correct? thanks again...

Re: How to find out different instances for same columns?
Mike.Scharnow - Fri Nov 17 09:23:53 EST 2017

Bill_B. - Fri Nov 17 08:48:09 EST 2017

Mike and Pekka, thank you both for your many helpful posts over the years to this forum...what I think he is asking, but not being very clear or nice about it, is how to get the Column Title information out where the attribute was renamed when added to a view...the code above gives the attribute name, but not the column title if it was renamed...I think replacing 'attrName' with 'title' will accomplish this, correct? thanks again...

Bill, well, yes, that's what I thought. attrName is described in DXL Manual, chapter Views, subchapter Columns, page 687. The same chapter page 693 mentions the following:

 

title(get)
Declaration
string title(Column c)
Operation
Returns the string that is the title of column c.

 

I'm sorry if I sound nagging or patronizing, but I think that if someone wants to start programming in DXL, you need to read a lot about the language, the least being the DXL manual and you need to read it often. So, if a question can be answered easily by looking into the manual, I prefer to tell people where to look instead of directly only posting the answer.